package com.bit.dreamer;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class SKTestActivity extends Activity {
	

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_sktest);
		
	
		Intent intent = this.getIntent();
		String desc = intent.getStringExtra("desc");
		int drawImageId = intent.getIntExtra("image", 0);
		int num = intent.getIntExtra("num", 0);
		TextView tv_sung = (TextView) findViewById(R.id.tv_sung);
		tv_sung.setText(desc);
		ImageView iv_sung = (ImageView) findViewById(R.id.iv_sung);
		iv_sung.setImageResource(drawImageId);
		Toast.makeText(getApplicationContext(), num + "번 그림을 선택하셨습니다.", Toast.LENGTH_SHORT).show();
		
		
		Button btn = (Button) findViewById(R.id.btn_sktest);
		btn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent= new Intent(getApplicationContext(), MainMenuActivity.class);
				startActivity(intent);

			}
		});
		
		
//		Intent intent2 = this.getIntent();
//		String desc2 = intent2.getStringExtra("desc2");
//		int drawImageId2 = intent2.getIntExtra("image2", R.drawable.sung2);
//		String desc2 = getIntent().getStringExtra("desc");
//		int drawImageId2 = getIntent().getIntExtra("image", 0);
//		
//		TextView tv_sung2 = (TextView) findViewById(R.id.tv_sung);
//		tv_sung.setText(desc2);
//		ImageView iv_sung2 = (ImageView) findViewById(R.id.iv_sung);
//		iv_sung.setImageResource(drawImageId2);
		
	}


}
